#include<stdio.h>
class Point
{
    public:
        Point()
        {
            X = Y =0;
            printf("Default Constructor called.\n");
        }
        Point(int xx, int yy)
        {
            X = xx;
            Y = yy; 
            printf("Constructor called.\n");
        }
        ~Point()
        {
            printf("Destructor called.\n");
        }
        int GetX() const {return X;}
        int GetY() const {return Y;}
        void Move(int x, int y)
        {
            X = x;
            Y = y;
        }
    private:
        int X, Y;
};
int main(int argc, char *argv[])
{
    Point *P1 = new Point;
    delete P1;
    P1 = new Point(1, 2);
    delete P1;
    return 0;
}
